<template>
  <div id="app">
    <div class="box" v-for="item of movies" :key="item.id">
      <img class="pic" :src="item.pic" alt="">
      <div>{{item.title}}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'App',
  data(){
    return {
      movies:[]
    }
  },
  mounted(){
    this.$http.get('/movie/top250').then(res=>{
      this.movies = res.data.res
    })
  }
}
</script>

<style>
#app{
  display: flex;
  flex-wrap: wrap;
}
.box{
  width: 180px;
}
.pic{
  width: 150px;
}
</style>
